package com.example.firstdemo.network.api.problem

import com.example.firstdemo.network.api.problem.data.ConfirmData
import com.example.firstdemo.network.api.problem.data.ProblemItem
import com.example.firstdemo.network.service.BaseResponse
import com.example.firstdemo.network.service.RetrofitService
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ProblemInterface {
    @GET("vehicle/carriage/problem/realToInspection")
    suspend fun getList(
    ): BaseResponse<List<ProblemItem>>

    @GET("vehicle/carriage/problem/getAutoProblemInfo")
    suspend fun getDetail(
        @Query("passTime")
        passTime: String,
        @Query("uid")
        uid: String
    ): BaseResponse<ProblemItem>

    @POST("/vehicle/carriage/problem/inspectionConfirm")
    suspend fun confirm(
        @Body data: ConfirmData
    ): BaseResponse<Int>
}

object ProblemApi : ProblemInterface by RetrofitService.create()